{% extends "common/base.html" %}
{% block title %} {{ block.super }} | Sign Up {% endblock %}
{% block content %}
<div id="container">
<h3>帐户注册</h1>
<p class="notice">请填写下面的表单来完成注册操作; 所有的选项都为必填项.</p>
<form method="post" action=""  enctype="multipart/form-data">
<table class="formTable" cellspacing="2" cellpadding="2">
    <tbody>
        <tr>
            <td colspan="3">
            {% if form.non_field_errors %}
            <p><span class="error">
            {{ form.non_field_errors|join:", " }}
            </span></p>
            {% endif %}
            </td>
        </tr>
        <tr>
            <td><label for="id_username">用户名:</label></td>
            <td>
                {{ form.username }}
            </td>
            <td>
                <p>{% if form.username.errors %}
                <span class="error">{{ form.username.errors|join:", " }}</span>
                {% endif %}</p>
            </td>
        </tr>
        <tr>
            <td><label for="id_name">e-mail 地址:</label></td>
            <td>{{ form.email }}</td>
            <td>{% if form.email.errors %}
            <span class="error">
            {{ form.email.errors|join:", " }}
            </span>
            {% endif %}</td>
        </tr>
        <tr>
            <td><label for="id_password1">密码:</label></td>
            <td>{{ form.password1 }}</td>
            <td>{% if form.password1.errors %}
            <span class="error">
            {{ form.passsword1.errors|join:", " }}
            </span>
            {% endif %}</td>
        </tr>
        <tr>
            <td><label for="id_password2">密码 (为防输入错误): </label></td>
            <td>{{ form.password2 }}</td>
            <td>{% if form.password2.errors %}
            <span class="error">
            {{ form.passsword2.errors|join:", " }}
            </span>
            {% endif %}</td>
        </tr>
        <tr>
            <td><label for="id_face">头像:</label></td>
            <td>{{ form.face }}</td>
            <td>{% if form.face.errors %}
                <span class="error">{{ form.face.errors|join:", " }}</span>
                {% endif %}</td>
        </tr>
        <tr>
            <td colspan="3"  align="right"><input type="submit" value="提交"></td>
        </tr>
        <tr>
            <td colspan="3">
                <p class="notice">
                    如果你已经有一个帐号, 请在这里 <a href="/login">登录</a> 。
                </p>
            </td>
        </tr>
    </tbody>
</table>
</form>
</div>
{% endblock %}